package comp512.classes;

import java.io.IOException;
import java.io.Serializable;

public class Statistics implements Serializable {
	
	private static final long serialVersionUID = 3L;
	private int wins;
	private int losses;
	
	public Statistics(){
		wins = 0;
		losses = 0;
	}
	
	public int getWins(){
		return wins;
	}
	
	public int getLosses(){
		return losses;
	}
	
	public void setWins(int wins){
		this.wins = wins;
	}
	
	public void setLosses(int losses){
		this.losses = losses;
	}
	
	public void incrementWins(){
		wins++;
	}
	
	public void incrementLosses(){
		losses++;
	}
	
	private void readObject(java.io.ObjectInputStream ois) throws IOException, ClassNotFoundException{
		wins =  ois.readInt();
		losses = ois.readInt();
	}
	
	private void writeObject(java.io.ObjectOutputStream oos) throws IOException{
		oos.writeInt(wins);
		oos.writeInt(losses);
	}
}
